require('../../assets/css/index.js')
require('../../assets/fonts/font/iconfont.css')
require('../../assets/lib/swiper/swiper-bundle.css')
let Swiper = require('../../assets/lib/swiper/swiper-bundle.js')
require('../../utils/local.js')
let https = require('../../utils/https.js')

// 引入公共js
let dom = require('../../utils/dom.js')
const local = require('../../utils/local.js')

//引入当前页面的less文件
require('./sports.less')
// 当前页面js
dom.isLogin()

dom.ready(function () {
    dom.bMenu('sports')
    dom.tMenu('sports')




    var map = new AMap.Map('container', {
        zoom: 12
    })
    console.log(dom.getEle("#btn"));
    dom.getEle("#btn").addEventListener("click", function () {
        let num=3;
        dom.getEle("#btn").style.display="none"
        dom.getEle("#model").style.display = "block";
        dom.getEle("footer").style.display = "none";
        setInterval(function () {
            dom.getEle("#time").innerHTML=num;
            console.log(num);
            num--;
            // dom.getEle("#time").innerHTML = num--;
            if (num == -1) {
                dom.getEle("#time").innerHTML = "go";


            } if (num == -2) {
                dom.getEle("#model").style.display = "none";

                window.location.href = 'run.html'
            }
        }, 1000)


    })
})